package day16.myreflect02;

/**
 * @author Xiao
 * @date 2021/8/10
 */
public class Student02 {
    private String name;
    private Integer age;

    public void study() {
        System.out.println("学生在学习。。。");
    }

    @Override
    public String toString() {
        return "Student02{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Student02(String name, Integer age) {
        this.name = name;
        this.age = age;
        System.out.println("constructor：private Student02("+ name + "\t" + age +") {}");
    }

    public Student02() {
        System.out.println("constructor：public Student02() {}");
    }

    private Student02(String name) {
        this.name = name;
        System.out.println("constructor：private Student02("+ name +") {}");
    }
}
